/**
 * 设置
 */
class Set{
    /**
     * 设置修改个人信息
     * @param name 名称
     * @param phone 手机号
     * @param mailbox 邮箱
     * @param informationId 个人信息Id
     * @param sparePhone 备用手机号
     * @param homeAddress 家庭地址
     * @param contact 联系人手机号
     * @param signature 联系人
     * @param contactPhone 联系电话
     * @param sex 性别
     * @param avatar 头像
     * @param administratorId 账号Id
     * @param dateBirth 出生日期
     * @param departmentId 职位Id
     * @return {Promise<json>}
     */
    administratorInformationUpdate(name,phone,mailbox,informationId,sparePhone,homeAddress,contact,signature,contactPhone,sex,avatar,administratorId,dateBirth,departmentId){
        return new Promise((resolve, reject) => {
            $.ajax({
                url: "/www.xiaomi.com/set",
                data:{
                    name:name,
                    phone:phone,
                    signature:signature,
                    sex:sex,
                    mailbox:mailbox,
                    sparePhone:sparePhone,
                    homeAddress:homeAddress,
                    contact:contact,
                    contactPhone:contactPhone,
                    administratorId:administratorId,
                    dateBirth:dateBirth,
                    avatar:avatar,
                    departmentId:departmentId,
                    informationId:informationId
                },
                success: function (response) {
                    resolve(response);
                },
                error: function (error) {
                    reject(error);
                }
            });
        });
    }
}